8b87618362d2e2cc2fed31841227b7f075e3174d,src/main/java/org/passay/dictionary/AbstractFileWordList.java,Cache,resize,#number#,418

Before Change


      if (allocateDirect) {
        temp = ByteBuffer.allocateDirect((int) size).asLongBuffer();
      } else {
        temp = ByteBuffer.allocate((int) size).asLongBuffer();
      }
      if (map == null) {
        map = temp;

After Change


      if (size > Integer.MAX_VALUE) {
        throw new IllegalArgumentException("Cache limit exceeded. Try reducing cacheSize.");
      }
      final LongBuffer temp = allocateDirect ?
        ByteBuffer.allocateDirect((int) size).asLongBuffer() : ByteBuffer.allocate((int) size).asLongBuffer();
      if (map == null) {
        map = temp;
      } else {